#include <iostream>

using namespace std;

int main()
{
        int *p;

        p = new int;

        *p = 5;
        cout << *p << endl;

        delete p;

        p = new int[5];
        p[3] = 123;
        for (int i = 0; i < 5; i++) {
                cout << p[i] << " ";
        }
        cout << endl;

        delete [] p;

        return 0;
}
